<?php
if(!isset($GLOBALS['_vars'])) $GLOBALS['_vars'] = array(); 
$fields = array();
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
<title>拍品管理</title>
<link rel="stylesheet" type="text/css" href="css/base.css">
<script language="javascript" src="../include/js/dedeajax2.js"></script>
<script language="javascript" src="js/ieemu.js"></script>
<script language="javascript" src="js/context_menu.js"></script>
<script language="javascript" src="js/main.js"></script>
<script language="javascript" src="js/list.js"></script>
<link rel="stylesheet" type="text/css" href="css/reveal.css">
<script language="javascript" src="js/jquery-1.7.1.min.js"></script>
<script language="javascript" src="js/jquery.reveal.js"></script>
<style>
body{
	position:relative;
	}
.center{
	width:574px;
	font-family:"微软雅黑";
	}
.center .title{
	line-height:32px;
	font-size:16px;
	color:#333;
	text-align:center;
	}
li{
	list-style:none;
	}
.center ul li{
	float:left;
	padding-left:27px;
	height:33px;
	border-bottom:1px solid #fff;
	line-height:33px;
	font-size:14px;
	color:#333;
	width:161px;
	background:#f9f9f9;
	}
.center ul li input{
	margin:0;
	margin-right:10px;
	margin-top:6px;
	}
.center .dc-btn{
	width:114px;
	height:39px;
	border:1px solid #c50e1b;
	background:url(images/tc_03.jpg) 27px center no-repeat;
	padding-left:56px;
	text-align:left;
	color:#c50e1b;
	margin:0 229px;
	cursor:pointer;
	}
.center .dc-btn:hover{
	background:#c50e1b url(images/tc_02.jpg) 27px center no-repeat;
	color:#fff;
	}
.close{
	width:15px;
	height:15px;
	position:absolute;
	right:16px;
	top:17px;
	}
.export{
	float:right;
	margin-right:0px;
	padding:5px;
	margin-left:7px; margin-top:5px; margin-bottom:5px;
	background:#d7000f; color:#fff!important;
	}
.export a{ color:#fff;}
</style></head>
<body leftmargin="8" topmargin="8"  onLoad="ContextMenu.intializeContextMenu()">
<!--  搜索表单  -->
<form name='form3' action='content_list_paipin.php' method='get'>
<input type='hidden' name='dopost' value='listArchives' />
<table width='98%'  border='0' cellpadding='1' cellspacing='1'  align="center" style="margin-top:8px">
<tr><td>
<div style="height:42px; line-height:42px; border-bottom:1px solid #CCCCCC; font-family:'微软雅黑'; color:#333; font-size:14px;">当前位置：拍品管理 ></div>
</td>
</tr>
  <tr bgcolor='#f9f9f9'>
    <td align='center'>
      <table border='0' cellpadding='0' cellspacing='0' height="32">
        <tr>
      <td width='160' style="display:none">
          <select name='cid' style='width:150px'>
          <option value='0'>选择栏目...</option>
          	<?php echo $GLOBALS['optionarr']; ?>
          </select>
        </td >
        <td nowrap>
          关键字：
        </td>
        <td width='130'>
          	<input type='text' name='keyword' value='<?php echo $GLOBALS['keyword']; ?>' style='width:120px' />
        </td>
        <td width='90'>
    		<select name='orderby' style='width:80px'>
            <option value='id'>排序...</option>
            <option value='title'>拍品名称</option>
            <option value='paipinleibie'>拍品类别</option>
            <option value='qipaijia'>起拍价</option>
            <option value='shichanggujia'>市场估价</option>			
            <option value='paimaijia'>拍卖价</option>
            <option value='paipinzuozhe'>拍品作者</option>
            <option value='juanzengren'>捐赠人</option>
            <option value='maishourenname'>买受人</option>
            <option value='paimaishijian'>拍卖时间</option>
            <option value='zhuangtai'>状态</option>
            <option value='pubdate'>更新时间</option>
            <option value='mid'>发布人</option>
      	</select>
      </td>
	  	  	       <td width='90'>
    		<select name='zhuangtai' style='width:80px'>
		   <option value=''>状态...</option>
 		 <?php 
		$addQuery = "SELECT fieldset FROM aier_channeltype   WHERE id=17";
    $addRow = $dsql->GetOne($addQuery);
	$fieldset = $addRow['fieldset']; 
	$f1 = strstr($fieldset, '状态');
	$f2 = strstr($f1, 'default');
	$f3 = mb_substr($f2,0,200,'utf-8');
	 preg_match("/default=['\"](.*)['\"]/U",$f3,$out);
     $r1=$out[1];
	 $hello = explode(',',$r1); 
  for($index=0;$index<count($hello);$index++){ 
echo "<option value='$hello[$index]'>";
echo $hello[$index];
echo "</option>"; 
} 
	?> 
       	</select>
      </td>
      <td width='90'>
    		<select name='flag' style='width:80px'>
            <option value=''>属性...</option>
            <?php echo $GLOBALS['flagsArr']; ?>
      	</select>
      </td>
       <td>
          <input name="imageField" type="submit" width="60" value="搜索" height="22" border="0" class="np ss-btn" />
       </td>
      </tr>
     </table>
   </td>
  </tr>
</table>
</form>
 <!--  快速转换位置按钮  -->
<table width="98%" border="0" cellpadding="0" cellspacing="1" align="center" >
<tr>
 <td height="26" >
  <table width="98%" border="0" cellspacing="0" cellpadding="0">
  <tr>
  <td align="center">
    <a style="background-color:#d7000f; float:left; width:68px; margin-right:8px; cursor:pointer; vertical-align:middle; border:none; height:27px; line-height:27px; text-align:center; color:#fff;"  onClick="location='catalog_do.php?channelid=<?php echo $GLOBALS['channelid']; ?>&cid=<?php echo $GLOBALS['cid']; ?>&dopost=addArchives';" value='' />添加数据</a>
  <?php if($adminid==$mid){ ?>
  <a style="background-color:#d7000f; float:left; width:68px;  margin-right:8px;cursor:pointer; vertical-align:middle; border:none; height:27px; line-height:27px; text-align:center; color:#fff;"  onClick="location='content_list.php?cid=<?php echo $GLOBALS['cid']; ?>&mid=0';" value='' />全部数据</td>
	<?php
}
else{
?>
  <a style="background-color:#d7000f; float:left; width:68px; cursor:pointer; vertical-align:middle; border:none; height:27px; line-height:27px; text-align:center; color:#fff;"  onClick="location='content_list.php?cid=<?php echo $GLOBALS['cid']; ?>&mid=<?php echo $cuserLogin->getUserID(); ?>';" value='' />我的数据</a><?php } ?>
 </td>
 </tr>
</table>
</td><td style="margin-left:20px;">
   <a href="#" data-reveal-id="myModal" data-animation="none" class="export">导出excel</a>
   <a href="#" data-reveal-id="myModal2" data-animation="none" class="export">导入excel</a></td>
</tr>
</table>
<!--  内容列表   -->
<form name="form2">
<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#f9f9f9" align="center" >
<tr align="center" bgcolor="#f9f9f9" height="25">
	<td width="4%">ID</td>
	<td width="4%">选择</td>
	<td width="10%">拍品名称</td>
	<td width="6%">拍品类别</td>
	<td width="7%">起拍价/万元</td>
	<td width="9%">市场估价/万元</td>
	<td width="7%">拍卖价/万元</td>
	<td width="7%">拍品作者</td>
	<td width="6%">捐赠人</td>
	<td width="6%">买受人</td>
	<td width="10%">拍卖时间</td>
	<td width="8%">状态</td>
	<td width="7%">更新时间</td>
	<td width="5%">发布人</td>
	<td width="5%">操作</td>
</tr>
<?php
$atts = array();
$atts['tagname'] = 'datalist';
$blockValue = $this->refObj->GetArcList($atts,$this->refObj,$fields); 
if(is_array($blockValue)){
foreach( $blockValue as $key=>$fields )
{
?>
<tr align='center' bgcolor="#FFFFFF" height="26" align="center" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';">
	<td nowrap>
		<?php echo $fields['id']; ?>
	</td>
	<td>
		<input name="arcID" type="checkbox" id="arcID" value="<?php echo $fields['id']; ?>" class="np" />
	</td>
	<td align='left'>
		<span id="arc<?php echo $fields['id']; ?>">
			<a href='archives_do.php?aid=<?php echo $fields['id']; ?>&dopost=editArchives'
				 oncontextmenu="ShowMenu(event,this,<?php echo $fields['id']; ?>,'<?php echo str_replace('\'', '', $fields['title']); ?>')">
				<u><?php echo $fields['title']; ?></u>
			</a>
		</span>
		<?php echo IsCommendArchives($fields['flag']); ?>
	</td>
	<td><?php echo $fields['paipinleibie']; ?></td>
	<td><?php echo $fields['qipaijia']; ?></td>
	<td><?php echo $fields['shichanggujia']; ?></td>
	<td><?php echo $fields['paimaijia']; ?></td>
	<td><?php echo $fields['paipinzuozhe']; ?></td>
	<td><?php echo $fields['juanzengren']; ?></td>
	<td><?php echo $fields['maishourenname']; ?></td>
	<td><?php echo GetDateMk($fields['paimaishijian']); ?></td>
	<td><?php echo $fields['zhuangtai']; ?></td>
	<td><?php echo GetDateMk($fields['pubdate']); ?></td>
	<td><?php echo GetMemberName($fields['mid']); ?></td>
	<td>
		<img src='images/gtk-edit.png' title="编辑" alt="编辑" onClick="editArc(<?php echo $fields['id']; ?>);" style='cursor:pointer' border='0' width='16' height='16' />
		<img src='images/part-list.gif' title="预览" alt="预览" onClick="viewArc(<?php echo $fields['id']; ?>);" style='cursor:pointer' border='0' width='16' height='16' />
	</td>
</tr>
<?php
}
}?>
<tr bgcolor="#ffffff">
<td height="36" colspan="15">
	&nbsp;
	<a href="javascript:selAll()" class="coolbg">全选</a>
	<a href="javascript:noSelAll()" class="coolbg">取消</a>
	<a href="javascript:updateArc(0)" class="coolbg">&nbsp;更新&nbsp;</a>
	<a href="javascript:checkArc(0)" class="coolbg">&nbsp;审核&nbsp;</a>
 
	<a href="javascript:delArc(0)" class="coolbg">&nbsp;删除&nbsp;</a>
	<?php if($channelid==1) echo "	<a href=\"javascript:kwArc(0)\" class=\"coolbg\">&nbsp;自动关键字&nbsp;</a>\r\n"; ?>
	<a href="javascript:;" onClick="cAtts('attsAdd',event,this)" class="coolbg">&nbsp;增加属性&nbsp;</a>
	<a href="javascript:;" onClick="cAtts('attsDel',event,this)" class="coolbg">&nbsp;删除属性&nbsp;</a>
</td>
</tr>
</form>
<tr align="right" bgcolor="#f9f9f9">
	<td height="36" colspan="15" align="center">
		<?php
$atts = array();
$atts['tagname'] = 'pagelist';
$atts['listsize'] = '3';
 echo $this->refObj->GetPageList($atts,$this->refObj,$fields); 
?>

	</td>
</tr>
</table>
<!--弹窗开始-->
<div id="myModal" class="reveal-modal">
<div class="center">
<p class="title">请选择需要导出的选项（多选）</p>
<form action="/pp_index.php?action=export" method="post"> 
      <input type="hidden" value='export' name="action" />
      <input type="hidden" value='' name="ids"  id="addId"/>
       <input type="hidden" value="拍品名称" name="title"  />
       <input type="hidden" value="拍品类别" name="paipinleibie"  />
       <input type="hidden" value="状态" name="zhuangtai"  />
        <input type="hidden" value="起拍价" name="qipaijia"  />
        <input type="hidden" value="市场估价" name="shichanggujia"  />
    	<input type="hidden" value="拍卖价" name="paimaijia"  />
        <input type="hidden" value="规格型号" name="guigexinghao"  />
        <input type="hidden" value="拍品作者" name="paipinzuozhe"  />
        <input type="hidden" value="拍品作者介绍" name="zuozhejieshao"  />
    	<input type="hidden" value="捐赠人" name="juanzengren"  />
    	<input type="hidden" value="捐赠人电话" name="juanzengrenlxfs"  />
    	<input type="hidden" value="捐赠时间" name="juanzengtime"  />
    	<input type="hidden" value="捐赠人地址" name="juanzengrendz"  />
    	<input type="hidden" value="拍卖时间" name="paimaishijian"  />
    	<input type="hidden" value="买受人姓名" name="maishourenname"  />
    	<input type="hidden" value="买受人电话" name="maishourendianhua"  />
    	<input type="hidden" value="买受人地址" name="maishourendz"  />
        <input type="hidden" value="买受人单位" name="maishourendanwei"  />
        <input type="hidden" value="买受人职务" name="maishourenzw"  />
        <input type="hidden" value="拍品简介" name="jianjie"  />
 	<ul>
        <li><input type="checkbox" value="title" name="option[]" id="option[]" />拍品名称</li>
    	<li><input type="checkbox" value="paipinleibie" name="option[]" id="option[]" />拍品类别</li>
    	<li><input type="checkbox" value="zhuangtai" name="option[]" id="option[]" />状态</li>
        <li><input type="checkbox" value="qipaijia" name="option[]" id="option[]" />起拍价</li>
        <li><input type="checkbox" value="shichanggujia" name="option[]" id="option[]" />市场估价</li>
        <li><input type="checkbox" value="paimaijia" name="option[]" id="option[]" />拍卖价</li>
    	<li><input type="checkbox" value="guigexinghao" name="option[]" id="option[]" />规格型号</li>
        <li><input type="checkbox" value="paipinzuozhe" name="option[]" id="option[]" />拍品作者</li>
        <li><input type="checkbox" value="zuozhejieshao" name="option[]" id="option[]" />拍品作者介绍</li>
        <li><input type="checkbox" value="juanzengren" name="option[]" id="option[]" />捐赠人</li>
        <li><input type="checkbox" value="juanzengrenlxfs" name="option[]" id="option[]" />捐赠人电话</li>
        <li><input type="checkbox" value="juanzengtime" name="option[]" id="option[]" />捐赠时间</li>
    	<li><input type="checkbox" value="juanzengrendz" name="option[]" id="option[]" />捐赠人地址</li>
        <li><input type="checkbox" value="paimaishijian" name="option[]" id="option[]" />拍卖时间</li>
        <li><input type="checkbox" value="maishourenname" name="option[]" id="option[]" />买受人姓名</li>
    	<li><input type="checkbox" value="maishourendianhua" name="option[]" id="option[]" />买受人电话</li>
        <li><input type="checkbox" value="maishourendz" name="option[]" id="option[]" />买受人地址</li>
        <li><input type="checkbox" value="maishourendanwei" name="option[]" id="option[]" />买受人单位</li>
        <li><input type="checkbox" value="maishourenzw" name="option[]" id="option[]" />买受人职务</li>
    	<li><input type="checkbox" value="jianjie" name="option[]" id="option[]" />拍品简介</li>
        <div style="clear:both;"></div>
    </ul>
        <p style="text-align:center; color:#666;"><b>备注：</b>不选择默认导出全部数据</p>
    <input class="dc-btn" data-reveal-id="myModal" data-animation="none" type="submit" value="导出" />
    <a href="" class="close close-reveal-modal"><img src="images/tc_01.jpg" width="15" height="15"></a>
</form>
</div>
</div>
<!--弹窗结束-->
<!--导入-->
<div id="myModal2" class="reveal-modal leading">
<p class="title">选择文档</p>
     <form name="upfile" id="upfile" class="drform" action="/pp_index.php?action=eximp" method="post" enctype="multipart/form-data">
		          <input type="file" id="import" name="import" class="np"/> 
		 		  <input type="submit" value="导入"  onchange="upfileSubmit()" onclick="return upfileSubmit()" class="drbtn"/> 
		       </form>
<a href="" class="close close-reveal-modal"><img src="images/tc_01.jpg" width="15" height="15"></a>
</div>
<!--导入-->
<script language="javascript" src="/js/export.js"></script>
</body>
</html>